Page({

  /**
   * 页面的初始数据
   */
  data: {
    tit:'',
    imgUrls:[
      [
        { id: 222, pic: "../../images/jpg/banner_kind.jpg", title: "牛类产品" },
        { id: 223, pic: "../../images/jpg/banner_kind.jpg", title: "羊类产品" },
        { id: 224, pic: "../../images/jpg/banner_kind.jpg", title: "猪类产品" },
        { id: 225, pic: "../../images/jpg/banner_kind.jpg", title: "鸡类产品" },
        { id: 226, pic: "../../images/jpg/banner_kind.jpg", title: "鸭类产品" },
        { id: 227, pic: "../../images/jpg/banner_kind.jpg", title: "海鲜冻品" },
        { id: 228, pic: "../../images/jpg/banner_kind.jpg", title: "酒店食材" },
        { id: 229, pic: "../../images/jpg/banner_kind.jpg", title: "火锅食材" },
        { id: 220, pic: "../../images/jpg/banner_kind.jpg", title: "肥牛肥羊" },
        { id: 220, pic: "../../images/jpg/banner_kind.jpg", title: "机械设备" }
      ],
      [
        { id: 232, pic: "../../images/jpg/banner_kind.jpg", title: "产品求购" },
        { id: 233, pic: "../../images/jpg/banner_kind.jpg", title: "粮油干货" },
        { id: 243, pic: "../../images/jpg/banner_kind.jpg", title: "展会信息" },
        { id: 235, pic: "../../images/jpg/banner_kind.jpg", title: "地方特产" }
      ]
    ],
    bannerImgs: ["../../images/jpg/banner.jpg", "../../images/jpg/banner.jpg", "../../images/jpg/banner.jpg"],
    newPublic:[
      { id: 122, pic:"../../images/jpg/new_pubic.jpg",title:"猪副冻品xxxxxxx"},
      { id: 124, pic: "../../images/jpg/new_pubic.jpg", title: "猪副冻品xxxxxxx" },
      { id: 125, pic: "../../images/jpg/new_pubic.jpg", title: "旭泽牛羊xxxxxxx" },
      { id: 126, pic: "../../images/jpg/new_pubic.jpg", title: "沁香春冷xxxxxxx" },
      { id: 127, pic: "../../images/jpg/new_pubic.jpg", title: "艾克拜尔xxxxxxx" },
      { id: 128, pic: "../../images/jpg/new_pubic.jpg", title: "猪副冻品xxxxxxx" },
      { id: 129, pic: "../../images/jpg/new_pubic.jpg", title: "猪副冻品xxxxxxx" },
      { id: 130, pic: "../../images/jpg/new_pubic.jpg", title: "猪副冻品xxxxxxx" },
    ],
    chooseKind:[
      {id:988,title:"牛类产品"},
      { id: 989, title: "羊类产品" },
      { id: 990, title: "猪类产品" },
      { id: 991, title: "鸡类产品" },
      { id: 992, title: "鸭类产品" },
      { id: 993, title: "海鲜冻品" },
      { id: 994, title: "酒店食材" },
      { id: 995, title: "火锅食材" },
      { id: 996, title: "肥牛肥羊" },
      { id: 997, title: "机械设备" },
    ],
    list:[
      {
        id:3122,
        headPic:"../../images/jpg/head_pic.jpg",
        title:"小晗-1337392205",
        top:1, //置顶
        tag:["鸡类产品","鸡翅"],
        tel:13628367187,
        des:"专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
        img:[
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg"
        ],
        addTime:"2018-02-19 16:46",
        address:"山东省潍坊市昌邑市新兴街",
        see:3234,
        point:33
      },
      {
        id: 3123,
        headPic: "../../images/jpg/head_pic.jpg",
        title: "小晗-1337392205",
        top: 1, //置顶
        tag: ["鸡类产品", "鸡翅"],
        tel: 13628367187,
        des: "专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
        img: [
          
        ],
        addTime: "2018-02-19 16:46",
        address: "山东省潍坊市昌邑市新兴街",
        see: 3234,
        point: 33
      },
      {
        id: 3124,
        headPic: "../../images/jpg/head_pic.jpg",
        title: "小晗-1337392205",
        top: 1, //置顶
        tag: ["鸡类产品", "鸡翅"],
        tel: 13628367187,
        des: "专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
        img: [
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg"
        ],
        addTime: "2018-02-19 16:46",
        address: "山东省潍坊市昌邑市新兴街",
        see: 3234,
        point: 33
      },
      {
        id: 3125,
        headPic: "../../images/jpg/head_pic.jpg",
        title: "小晗-1337392205",
        top: 1, //置顶
        tag: ["鸡类产品", "鸡翅"],
        tel: 13628367187,
        des: "专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
        img: [
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg"
        ],
        addTime: "2018-02-19 16:46",
        address: "山东省潍坊市昌邑市新兴街",
        see: 3234,
        point: 33
      },
      {
        id: 3126,
        headPic: "../../images/jpg/head_pic.jpg",
        title: "小晗-1337392205",
        top: 1, //置顶
        tag: ["鸡类产品", "鸡翅"],
        tel: 13628367187,
        des: "专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
        img: [
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg"
        ],
        addTime: "2018-02-19 16:46",
        address: "山东省潍坊市昌邑市新兴街",
        see: 3234,
        point: 33
      },
      {
        id: 3128,
        headPic: "../../images/jpg/head_pic.jpg",
        title: "小晗-1337392205",
        top: 1, //置顶
        tag: ["鸡类产品", "鸡翅"],
        tel: 13628367187,
        des: "专业生产鸡翅中，规格：20/30、30/40、40/50克，质量好价格低，诚招全国经销商，欢迎全国经销商，欢迎各位老板前来洽谈合作！15953633988（微信同号）",
        img: [
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg",
          "../../images/jpg/preview.jpg"
        ],
        addTime: "2018-02-19 16:46",
        address: "山东省潍坊市昌邑市新兴街",
        see: 3234,
        point: 33
      }
    ],
    // 视频
    videoList:[
      {
        id:4344,
        cover:"../../images/jpg/banner.jpg",
        title:"视频标题，123",
        time:"05:12",
        see:3321
      },
      {
        id: 4344,
        cover: "../../images/jpg/banner.jpg",
        title: "视频标题，123",
        time: "05:12",
        see: 3321
      },
       {
        id: 4344,
        cover: "../../images/jpg/banner.jpg",
        title: "视频标题，123",
        time: "05:12",
        see: 3321
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.setNavigationBarTitle({
        title: '先冻品平台',
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  },
  searchDone(e) {
    // 搜索内容是e.detail.value
    // 内容为空或者搜索不到提示
    // 搜索成功直接跳转到详情页
  },
  changeChooseKind(e) {
    this.setData({ tit : e.target.id});
  },
  goMerchant() {
      wx.switchTab({
          url: '../merchant/merchant',
      })
  },
  previewPic(e) {
      let current = e.target.dataset.current;
      let urls = e.target.dataset.urls;
      wx.previewImage({
          current: current, // 当前显示图片的http链接
          urls: urls // 需要预览的图片http链接列表
      })
  }

})